package com.bw.mine.login.viewmodel

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object LoginModule {

    @Singleton
    @Provides
    fun getLoginApiService(retrofit: Retrofit):LoginApiService = retrofit.create(LoginApiService::class.java)

    @Singleton
    @Provides
    fun getLoginRepo(loginApiService: LoginApiService):LoginRepo = LoginRepo(loginApiService)
}